-- GENERATED SPELL FOR [Razorthorn Flayer] --


function spell0_24920(pUnit, Event) --@Desperate Defense,n/a--
pUnit:FullCastSpellOnTarget(33896,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24920', 6276, 1)
end

function spell1_24920(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(46202,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24920', 10000, 1)
end

function spell2_24920(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(13443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24920', 15000, 1)
end

function Sorts_24920(pUnit, Event)
local choix_sorts_24920 = math.random(0, 2)
if choix_sorts_24920 == 0 then
pUnit:RegisterEvent('spell0_24920', 1, 1)
end
if choix_sorts_24920 == 1 then
pUnit:RegisterEvent('spell1_24920', 1, 1)
end
if choix_sorts_24920 == 2 then
pUnit:RegisterEvent('spell2_24920', 1, 1)
end
end

function mob24920_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24920', math.random(1500, 3000), 1)
end

function mob24920_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24920_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24920_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24920, 1, 'mob24920_Action')
RegisterUnitEvent(24920, 2, 'mob24920_Leave')
RegisterUnitEvent(24920, 3, 'mob24920_Kill')
RegisterUnitEvent(24920, 4, 'mob24920_Die')
